// dnSpy decompiler from Assembly-CSharp.dll class: MovementPath
using System;
using System.Collections.Generic;
using UnityEngine;

public class MovementPath : MonoBehaviour
{
	protected void Init()
	{
		if (this.waypoints == null)
		{
			this.waypoints = new List<Waypoint>();
		}
	}

	public virtual void AddWaypointFromCurrentTransform()
	{
		this.Init();
		this.waypoints.Add(new Waypoint(base.transform));
	}

	public Waypoint GetRandomWaypoint()
	{
		this.Init();
		return this.waypoints[UnityEngine.Random.Range(0, this.waypoints.Count)];
	}

	public int GetNumWaypoints()
	{
		this.Init();
		return this.waypoints.Count;
	}

	public void TeleportToWaypoint(int waypointIndex)
	{
		this.Init();
		this.waypoints[waypointIndex].CopyTo(base.transform);
	}

	public void DeleteWaypoint(int waypointIndex)
	{
		this.Init();
		this.waypoints.RemoveAt(waypointIndex);
	}

	[SerializeField]
	protected List<Waypoint> waypoints;
}
